#include "TheadPool.hpp"
#include "Log.hpp"
#include "Task.hpp"
#include  <memory>

using namespace LogModule;
using namespace ThreadPoolModule;

int main()
{
    Enable_Console_Log_Strategy();


    // ThreadPool<int>* tp = new ThreadPool<int>();
    // tp->Start();

    // sleep(3);
    // tp->Stop();
    // sleep(3);

    // tp->Join();

    ThreadPool<task_t>* td = ThreadPool<task_t>::GetInstance();
    int cnt = 3;
    while(cnt--)
    {
        sleep(1);
        td->Enqueue(Download);
    }

    td->Stop();
    td->Join();
    return 0;
}

